/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.kylingroup.J2SE.Thread;

/**
 *
 * @author kylin
 */
public class TestThreadDaemon extends Thread{
    public void run(){
        for(int i=0;i<100;i++){
            System.out.println(getName()+" "+i);
        }
    }
    public static void main(String args[]){
        TestThreadDaemon t=new TestThreadDaemon();
        t.setDaemon(true);
        t.start();
        for(int i=0;i<10;i++){
            System.out.println(Thread.currentThread().getName()+" "+i);
        }
    }
}
